<template>
  <div class="layout">
    <div class="table-layout">
      <div class="table-header">
        <el-row>
          <el-form ref="queryForm" :inline="true" :model="queryParams" class="demo-form-inline">
            <el-form-item label="等级" prop="dj">
              <el-input v-model="queryParams.dj" placeholder="请输入" clearable />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-search" @click="searchHandle">查询</el-button>
              <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
            </el-form-item>
          </el-form>
        </el-row>
      </div>
      <div class="table-body">
        <el-table :data="tableData" style="width: 100%" height="100%" stripe>
          <el-table-column align="center" prop="dj" label="等级" />
          <el-table-column align="center" prop="bz" width="180" label="标准" />
          <el-table-column align="center" prop="clcs" label="处理措施" />
          <el-table-column align="center" prop="cjr" label="创建人" />
          <el-table-column align="center" prop="cjsj" label="创建时间" />
          <el-table-column align="center" prop="xgr" label="修改人" />
          <el-table-column align="center" prop="xgsj" label="修改时间" />
        </el-table>
      </div>
      <div class="table-footer">
        <pagination
          background
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
          :page.sync="pageParams.pageNum"
          :limit.sync="pageParams.pageSize"
          @pagination="getList"
        />
      </div>
    </div>
    <el-drawer
      title="处理"
      :visible.sync="drawerOpen"
      append-to-body
      size="900px"
      custom-class="dv_drawer"
    >
      <formDetail ref="formBox" :type="'add'" :show-flag="false" />
      <div class="drawer-footer">
        <el-button @click="drawerOpen=false">取 消</el-button>
        <el-button type="primary">确 定</el-button>
      </div>
    </el-drawer>
  </div>
</template>

<script>
import page_common from '@/views/mixins/page_common.js'
import formDetail from '../../caseEntry/arrest/form.vue'
export default {
  name: 'Todo',
  components: { formDetail },
  mixins: [page_common],
  data() {
    return {
      queryParams: { dj: '' },
      tableData: [],
      drawerOpen: false
    }
  },
  created() {
    this.searchHandle()
  },
  methods: {
    getList() {
      this.tableData = [
        {
          dj: 'A‌',
          bz: '无漏填错填，文书规范',
          clcs: '通报表扬',
          cjsj: '2025-03-01',
          cjr: '管理员',
          xgr: '管理员',
          xgsj: '2025-03-02'
        }, {
          dj: 'B',
          bz: '轻微错误，及时修正',
          clcs: '限期整改',
          cjsj: '2025-03-01',
          cjr: '管理员',
          xgr: '管理员',
          xgsj: '2025-03-02'
        }, {
          dj: 'C',
          bz: '重大错误或逾期未修正',
          clcs: '提交整改报告，约谈负责人',
          cjsj: '2025-03-01',
          cjr: '管理员',
          xgr: '管理员',
          xgsj: '2025-03-02'
        }
      ]
    },
    handle(rowData) {
      this.drawerOpen = true
      this.$nextTick(() => {
        this.$refs.formBox.init(rowData, 'add')
      })
    },
    handleDetail() {

    }

  }
}
</script>

<style scoped lang='scss'>

</style>
